package com.cykj.pos.mapper;

import com.cykj.pos.domain.AizStatisticalMerchant;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * 代理渠道交易收益统计Mapper接口
 *
 * @author xxl
 * @date 2025-03-21
 */
public interface AizStatisticalMerchantMapper extends BaseMapper<AizStatisticalMerchant> {

    List<AizStatisticalMerchant> queryAllList();

    AizStatisticalMerchant getAizStatisticalsByUserIdAndChannel(@Param("userId") Long userId, @Param("channelId")Long channelId);

    void updateTransAmount(AizStatisticalMerchant asm);

    BigDecimal getLastTransAmount(@Param("merchId") Long merchId, @Param("channelId") Integer channelId);

    BigDecimal getThisTransAmount(@Param("merchId") Long merchId, @Param("channelId") Integer channelId);

    BigDecimal getLastProfitAmount(@Param("merchId") Long merchId, @Param("channelId") Integer channelId);

    BigDecimal getThisProfitAmount(@Param("merchId") Long merchId, @Param("channelId") Integer channelId);
}
